package Boundry.GenericTools;

import java.awt.SystemColor;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JPanel;

import Controllers.GlobalData;

public class ViewDataPanel extends JPanel 
{
	public JButton btnBack,btnNext,btnRefresh;
	protected JPanel buttonPanel;
	public JPanel  mainPanel;
	public ViewDataPanel() 
	{
		setBackground(SystemColor.activeCaption);
		int buttonPanelWidth=GlobalData.PanelWidth , buttonPanelHeight=40;
		
		setSize(GlobalData.PanelWidth,GlobalData.PanelHeight);
		setLayout(null);
		
		
		buttonPanel = new JPanel();
		buttonPanel.setBounds(0, GlobalData.PanelHeight-GlobalData.SlaveHeight, GlobalData.PanelWidth,GlobalData.SlaveHeight);
		buttonPanel.setBackground(SystemColor.activeCaption);
		add(buttonPanel);
		buttonPanel.setLayout(null);
		
		mainPanel = new JPanel();
		mainPanel.setBounds(0, 0, GlobalData.PanelWidth,GlobalData.PanelHeight-GlobalData.SlaveHeight);
		mainPanel.setBackground(SystemColor.activeCaption);
		add(mainPanel);
		mainPanel.setLayout(null);
		
		btnBack = new JButton("");
		btnBack.setIcon(new ImageIcon(InputPanel.class.getResource("/GUI/Image/1_navigation_back.png")));
		btnBack.setBounds(10, 11, 65, 32);
		buttonPanel.add(btnBack);
		
		btnNext = new JButton("");
		btnNext.setIcon(new ImageIcon(InputPanel.class.getResource("/GUI/Image/1_navigation_forward.png")));
		btnNext.setBounds(821, 11, 65, 32);
		buttonPanel.add(btnNext);
		
		btnRefresh = new JButton("");
		btnRefresh.setIcon(new ImageIcon(InputPanel.class.getResource("/GUI/Image/1_navigation_refresh.png")));
		btnRefresh.setBounds(720, 11, 65, 32);
		buttonPanel.add(btnRefresh);
		

		// TODO Auto-generated constructor stub
	}
	public void showButtons()
	{
		buttonPanel.setVisible(true);
	}

	public void hideButtons()
	{
		buttonPanel.setVisible(false);
	}
	
	
	
	public void showBackButton()
	{
		btnBack.setVisible(true);
	}

	public void hideBackButton()
	{
		btnBack.setVisible(false);
	}
	
	
	public void showRefreshButton()
	{
		btnRefresh.setVisible(true);
	}

	public void hideRefreshButton()
	{
		btnRefresh.setVisible(false);
	}
	
	
	
	public void showNextButton()
	{
		btnNext.setVisible(true);
	}

	public void hideNextButton()
	{
		btnNext.setVisible(false);
	}
	
}
